package controller

import (
	"github.com/kataras/iris/v12"
)

type TestController struct{}

//注册路由
func (t TestController) RegisterRoute(app *iris.Application) {
	//app.Get("/pingtest", middleware.Before,testHandler1,middleware.After)
	app.Get("/pingtest",testHandler1)
	//app.Get("/pingtest", middleware.StartTime, testHandler1, middleware.EndTime)
}

//Handler
func testHandler1(ctx iris.Context) {
	//gt.Logger.Sugar().Infof("%#v\n", iris.DefaultConfiguration())
	ctx.JSON(iris.Map{"message": "pong-testHandler1"})
	ctx.Next()
}
